using System;
using System.Data.Common;
using Microsoft.EntityFrameworkCore;

namespace Choucius.Boilerplate9.EntityFrameworkCore
{
    public static class Boilerplate9DbContextConfigurer
    {
        public static void Configure(DbContextOptionsBuilder<Boilerplate9DbContext> builder, string connectionString)
        {
            //builder.UseSqlServer(connectionString);
            builder.UseMySql(connectionString, new MySqlServerVersion(new Version(8, 0, 11)));
        }

        public static void Configure(DbContextOptionsBuilder<Boilerplate9DbContext> builder, DbConnection connection)
        {
            //builder.UseSqlServer(connection);
            builder.UseMySql(connection, new MySqlServerVersion(new Version(8, 0, 11)));

        }
    }
}
